import { MockMethod } from 'vite-plugin-mock';
import { resultPageSuccess, resultSuccess } from '../_util';

const resultList = [
  {
    "id": 1,
    "doctorName": "刘克森",
    "doctorId": 213124121,
    "doctorIdentity": "411524200111181433",
    "address": import.meta.env.VITE_PUBLIC_PATH + '/src/assets/pdf/file/Signed_Organize.pdf',
    "esignId": null,
    "conpanyName": "公司名称1",
    "signTime": "合同签署时间1",
    "beginTime": "合同开始时间1",
    "endTime": "合同结束时间1",
    "pdfImg": "https://api.yythealth.com/files/raw/1d965c657d736321014568bf0bdbcdab",
    "mobile": '17744470272',
    "state": "1"
  }
];

export default [
  {
    url: '/basic-api/findContractSign',
    timeout: 200,
    method: 'post',
    response: () => {
      return resultSuccess(resultList);
    },
  },
  {
    url: '/basic-api/addContractSign',
    timeout: 200,
    method: 'post',
    response: ({ body }) => {
      return resultSuccess({ ...body, id: 2, });
    },
  },
  {
    url: '/basic-api/updateContractSign',
    timeout: 200,
    method: 'put',
    response: ({ body }) => {
      return resultSuccess(body);
    },
  },
] as MockMethod[];
